package de.stefanocke.roo.wicket.templates

import de.stefanocke.roo.wicket.Stereotypes

class ILabeledTemplate extends JavaHtmlTemplate{
	
	override String javaClassNameWhenNew(){
		"ILabeled"
	}
	
	override String stereotype(){
		Stereotypes::ILABELED
	}
	
	override subPackageToUseWhenNew(){
		"common"
	}
		
	override buildJavaContents(){
		import_("org.apache.wicket.markup.html.form.ILabelProvider")
		import_("org.apache.wicket.model.IModel");
		
		'''
		/**
		 * Interface implemented by components that have labels.
		 * 
		 * @author stoc
		 */
		«stereotypeAnnotation»
		public interface «simpleTypeName» extends ILabelProvider<String>{
			/**
			 * Sets the label.
			 * 
			 * @param labelModel the label model
			 */
			void setLabel(IModel<String> labelModel);
		
		}
		'''
	}
	
}